let abc = 'http://www.itcbc.com:8080'
$.ajaxPrefilter(function (option) {
    option.url = abc + option.url
    //统一配置headers
    option.headers = {
        //加请求头，否则会提示身份认证失败
            Authorization: localStorage.getItem('token')
    }
    //同意配置complete
    option.complete = function (xhr) {
        // console.log(xhr);
        let res = xhr.responseJSON
        //先判断res有值
        if (res && res.status === 1 && res.message === '身份认证失败！') {
            //移除过期的token 或者假token
            localStorage.removeItem('token')
            //跳转到登录页
           location.href = 'login.html'
        }
    }
})